home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
windows
/
uts60323.zip
/
UTS60323.EXE
/
UPLO-UTS.SC_
/
UPLO-UTS.SC
Wrap
Text File
|
1996-11-19
|
2KB
|
84 lines
// A demonstration upload script using dostomapper.
// This demo will need some adjustments to run on your applications.
// In general: To do a upload you need an application to capture
// the data on the remote host - something that would send all
// incomming data to a file.
// You may also try a crude interactive method, using the Read menu option
// which may upload a screen full of data at a time to an application
// that gives no responses - just accepts all data.
s5 = "upload.tst"
open s5 0
v0 = 0 // line counter
s2 = "\ee" // cursor home
s3 = "\eM" // clear screen
if (ferr == 0)
send s2
send s3
send "dostomapper "
send "\e!T"
wait 400
send s2
send s3
send "\r"
v9 = 1
v0 = 0
v1 = 0 // number to put
v2 = 1759 // maximum block length to send
while v9
if v1==0 && v9 != 2
s0 = readln(0)
if ferr != 0
v9 = 2
v1 = 2
s1 = "{f"
else
v1 = len(s0) + 2
s1 = "{l"
endif
endif
if v1 && v0+v1 < v2 // room left on screen
v0 = v0 + v1
send s0
send s1
v1 = 0
else
send "\e!T"
wait 200
if flags & 1
send "\e!U"
send s2
send s3
send "No response from host!"
v9 = 0
else
if flags & 2
send "\e!U"
send s2
send s3
send "User abort!"
v9 = 0
else
s4 = screen(0,0,2)
if match(s4," ") == 0
display "Bad response from host!"
v9 = 0
else
send s2
send s3
send "\r"
v0 = 0
if v1 == 0
send "done!"
v9 = 0 // done!
endif
endif
endif
endif
endif
endwhile
close 0
else
display "Open error on 'upload.tst'"
endif